#pragma once
#include "TypeDefs.h"
#include <string>

class vector4
{
public:
	vector4(void);
	vector4(const vector3 &a, int w);
	vector4(const vector3 &a, float w);
	vector4(const vector4 &a);
	vector4(const color &colorA);
	vector4(float x, float y, float z, float w);
	vector4(uint x, uint y, uint z, uint w);
	vector4(int x, int y, int z, int w);
	~vector4(void);
	vector4 operator+(const vector4 &b);
	vector4 operator-(const vector4 &b);
	vector4 operator*(float a);
	vector4 operator/(float a);
	vector4 Normalize();
	vector4 Negate();
	vector4 NormalizeW();
	std::string ToString() const;
	float Length();

	static vector4 Lerp(const vector4 &a, const vector4 &b, float step)
	{
		float sX = a.x + (b.x - a.x) * step;
		float sY = a.y + (b.y - a.y) * step;
		float sZ = a.z + (b.z - a.z) * step;
		float sW = a.w + (b.w - a.w) * step;
		return vector4(sX, sY, sZ, sW);
	};

	float x;
	float y;
	float z;
	float w;
};

